<div id="login">
    <div class="center-box">
        <div class="logo-box">
            <a href="#/login">
                <img src="/img/logo.png"></img>
            </a>
        </div>
        <div class="form-container">
            <div id="register-form">
                <fieldset class="register-select">
                    <input type="radio" id="existing-off" ng-model="form.existing" value="off" name="existing"/>
                    <label for="existing-off" i18next="register.are-new-user">You are new user?</label>
                </fieldset>

                <form id="form1" method="post" action="" gm-checksley-form="ctrl.submit()" ng-hide="form.existing == 'on'">
                    <fieldset>
                        <div class="form-field">
                            <label i18next="register.username">Username</label>
                            <input type="text" name="username" ng-model="form.username" data-required="true" data-minlength="3" />
                        </div>
                        <div class="form-field">
                            <label i18next="register.full-name">Full name</label>
                            <input type="text" name="full_name" ng-model="form.full_name" data-required="true" />
                        </div>
                        <div class="form-field">
                            <label i18next="register.email">Email</label>
                            <input type="email" name="email" ng-model="form.email" data-required="true" />
                        </div>

                        <div class="form-field">
                            <label i18next="register.password">Password</label>
                            <input type="password" name="password" id="password1" ng-model="form.password" data-required="true" data-minlength="8"  />
                        </div>
                        <div class="form-field">
                            <label i18next="register.password-again">Password again</label>
                            <input type="password" data-required="true" data-minlength="8" data-equalto="#password1" />
                        </div>

                        <div class="form-field">
                            <input class="btn01" type="submit" value="Register" gm-checksley-submit-button i18next="value:register.register" />
                        </div>
                    </fieldset>

                </form>

                <fieldset class="register-select">
                    <input type="radio" id="existing-on" ng-model="form.existing" value="on" name="existing" checked="checked" />
                    <label for="existing-on" i18next="register.are-existing-user">You are existing user?</label>
                </fieldset>

                <form id="form1" method="post" action="" gm-checksley-form="ctrl.submit()" ng-show="form.existing == 'on'">
                    <fieldset>
                        <div class="form-field">
                            <label i18next="register.username">Username</label>
                            <input type="text" name="username" ng-model="form.username" data-required="true" />
                        </div>

                        <div class="form-field">
                            <label i18next="register.password">Password</label>
                            <input type="password" name="password" id="password1" ng-model="form.password" data-required="true" data-minlength="4"  />
                        </div>
                        <div class="form-field">
                            <input class="btn01" type="submit" value="Register" gm-checksley-submit-button i18next="value:register.register" />
                        </div>
                    </fieldset>

                </form>

                <!-- if success {.loading } else {.error} -->
                <div class="login-message">
                    <p class="loading" ng-show="!error && loading">
                        <span class="loading-ico"></span>
                        <span i18next="register.loading">Our Oompa Loompas are registering you, please wait...</span>
                    </p>
                    <p class="error" ng-show="error" i18next="register.error">
                        {{ errorMessage }}
                    </p>
                </div>
            </form>
        </div>
    </div>
</div>
